package tianyiyun;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main2 {

    public static void main(String[] args) throws Exception{
        BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
        String s = buf.readLine();
        String[] ss;
        int n = Integer.parseInt(s);
        int[] arr = new int[n];
        s = buf.readLine();
        ss = s.split(",");
        int count = 0;
        for (int i = 0; i < n; i++){
            int tmp = Integer.parseInt(ss[i]);
            if (tmp%2 == 0){
                count++;
            }
            arr[i] = tmp;
        }
        int[] nums = new int[n];
        int index1 = 0;
        int index2 = count;
        for (int i = 0; i < n; i++){
            if (arr[i]%2 == 0){
                nums[index1++] = arr[i];
            } else {
                nums[index2++] = arr[i];
            }
        }
        StringBuilder sb = new StringBuilder(2*n);
        for (int i = 0; i < n; i++){
            sb.append(nums[i]).append(",");
        }
        if (sb.length() > 0){
            sb.deleteCharAt(sb.length() - 1);
        }

        System.out.println(sb.toString());

    }
}
